# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-moose
_cpanname=Moose
pkgver=2.2015
pkgrel=5
pkgdesc='A postmodern object system for Perl 5.'
arch=('x86_64' 'aarch64')
url='https://metacpan.org/pod/Moose'
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-class-load>=0.09' 'perl-class-load-xs>=0.01'
         'perl-data-optlist>=0.107' 'perl-devel-globaldestruction'
         'perl-dist-checkconflicts>=0.02' 'perl-eval-closure>=0.04'
         'perl-list-moreutils>=0.28' 'perl-mro-compat>=0.05'
         'perl-package-deprecationmanager>=0.11' 'perl-package-stash>=0.32'
         'perl-package-stash-xs>=0.24' 'perl-params-util>=1.00'
         'perl-sub-exporter>=0.980' 'perl-sub-name>=0.05' 'perl-task-weaken'
         'perl-test-checkdeps' 'perl-try-tiny>=0.02')
makedepends=('perl-dist-checkconflicts>=0.02' 'perl-test-fatal>=0.001' 'perl-test-requires>=0.05' 'perl-test-without-module')
source=("http://cpan.metacpan.org/authors/id/E/ET/ETHER/$_cpanname-$pkgver.tar.gz")
sha512sums=('162a0cd5f96f943cfd9f4a7f9fdc3f86341805045ecab418e1420e3b5e90b216d243515f073274bdb83846fddad78169ef5a2a6c41849466bb36a24c71a38b1b')

build() {
  cd "$_cpanname-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd "$_cpanname-$pkgver"

  make install DESTDIR="$pkgdir"

  find "$pkgdir" -name '.packlist' -o -name '*.pod' -delete
}

